package com.yunxi.otd.pojo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.yunxi.core.web.DateJsonDeserializer;
import com.yunxi.vehicle.pojo.VehicleProductViewVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.StringUtils;

/**
 * <p>
 * 周度需求计划明细
 * </p>
 *
 * @author XUQI
 * @since 2019-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "OtdWeekPlanDetail对象", description = "周度需求计划明细")
public class OtdWeekPlanDetailVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "周度需求计划明细ID")
    private String weekPlanDetailId;

    @ApiModelProperty(value = "周度需求计划明细Code")
    private String weekPlanDetailCode;

    @ApiModelProperty(value = "周度需求计划CODE")
    private String weekPlanCode;

    @ApiModelProperty(value = "产品Code")
    private String productCode;

    private VehicleProductViewVO product;

    @ApiModelProperty(value = "选装包")
    private String customPackCode;

    @ApiModelProperty(value = "选装包名称")
    private String customPackName;

    @ApiModelProperty(value = "需求数量")
    private Integer planNum;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @JsonDeserialize(using = DateJsonDeserializer.class)
    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "最后修改人")
    private String updateBy;

    @JsonDeserialize(using = DateJsonDeserializer.class)
    @ApiModelProperty(value = "最后修改时间")
    private Date updateDate;

    @ApiModelProperty(value = "版本号")
    private Integer version;

    @ApiModelProperty(value = "接口传送标识")
    private Integer isSend;

    @ApiModelProperty(value = "是否删除")
    private Integer isDel;

    public String getCustomPackCode() {
        return StringUtils.isEmpty(this.customPackCode) ? null : this.customPackCode;
    }

    private transient int isLimit = 0;
}
